package com.etc.dao;

import java.util.List;

import com.etc.entity.Announcement;
import com.etc.util.PageData;

public interface AnnouncementDao {
/**
 * 查询所有公告
 */
	public abstract List<Announcement> queryAllAnnouncement();
/**
 * 	增加公告
 */
	public abstract boolean addAnnouncement(Announcement announcement);
/**
 * 删除公告	
 */ 
	public abstract boolean rmvAnnouncement(int id);
/**
 * 按照内容查询公告	
 */
	public abstract Announcement queryAnnouncement(String name);
	/**
	 * 查询最新的100条公告
	 */
	public abstract List<Announcement> queryNewAnnouncement();
	
	/**
	 * 模糊查询+分页查询
	 * @param mlike
	 * @return
	 * @author zww
	 */
	public PageData queryAnnByLikeAndLimit(int pageNo,int pageSize,String alike);
	
	/**
	 * 根据留言编号查询
	 * @param id
	 * @return
	 * @author zww
	 */
	public Announcement queryAnnById(int id);
	
	/**
	 * 不带分页且根据关键字查询
	 * @param title
	 * @return
	 */
	public List<Announcement> queryByTitleLike(String title);
	
	
}
